home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / COMAL / T-COMAL Today / (k)te.d64 / bubblesort2.proc < prev    next >
Text File  |  2009-01-03  |  351b  |  14 lines

  1. 9290 PROC BUBBLESORT2 
  2. 9295   END':=11
  3. 9300   REPEAT 
  4. 9305     EXCHANGED:=FALSE
  5. 9310     END':-1
  6. 9315     FOR START:=1 TO END' DO
  7. 9320       IF NAME$(START)>NAME$(START+1) THEN
  8. 9325         EXCHANGE(NAME$(START),NAME$(START+1))
  9. 9330         EXCHANGED:=TRUE
  10. 9335       ENDIF 
  11. 9340     ENDFOR START
  12. 9345   UNTIL EXCHANGED=FALSE
  13. 9350 ENDPROC BUBBLESORT2
  14.